package com.eastjet.equipment.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.eastjet.equipment.service.DeviceAcceptanceService;
import com.eastjet.maintenance.domain.DeviceAcceptance;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@CrossOrigin
@RestController
@RequestMapping("/acceptance")
public class AcceptanceController {

    @Autowired
    private DeviceAcceptanceService deviceAcceptanceService;

    @RequestMapping("/list")
    public Page<DeviceAcceptance> getAcceptanceList(@RequestParam(defaultValue = "1") int page,
                                                    @RequestParam(defaultValue = "2") int size,
                                                    @RequestParam(defaultValue ="") String condition){
        System.out.println("condition:" + condition);
        return deviceAcceptanceService.getAcceptanceList(page,size,condition);
    }


}
